WHATSAT: Dynamic Heap Type Inference for Program Understanding and Debugging
نویسندگان
چکیده
C programs can be difficult to debug due to lax type enforcement and low-level access to memory. We present a dynamic analysis for C that checks heap snapshots for consistency with program types. Our approach builds on ideas from physical subtyping and conservative garbage collection. We infer a program-defined type for each allocated storage location or identify “untypable” blocks that reveal heap corruption or type safety violations. The analysis exploits symbolic debug information if present, but requires no annotation or recompilation beyond a list of defined program types and allocated heap blocks. We have integrated our analysis into the GNU Debugger (gdb), and describe our initial experience using this tool with several small to medium-sized programs.
منابع مشابه
1 Dynamic Heap Type Inference for Program Understanding and Debugging ∗
C programs can be difficult to debug due to lax type enforcement and low-level access to memory. We present a dynamic analysis for C that checks heap snapshots for consistency with program types. Our approach builds on ideas from physical subtyping and conservative garbage collection. We infer a program-defined type for each allocated storage location or identify “untypable” blocks that reveal ...
متن کاملHigh-Level Heap Abstractions for Debugging Programs
The identification, isolation, and correction of program defects require the understanding of both the algorithmic structure of the code as well as the data structures that are being manipulated. While modern development environments provide substantial support for examining the program source code (the algorithmic aspect of the program), they provide relatively weak support for examining heap-...
متن کاملHeapVision:Debugging by Interactive Heap Navigation
With the proliferation of online source code repositories such as GitHub and BitBucket, programmers have instant access to countless code examples. With the availability of these resources the focus in software development shifts away from writing code towards understanding source code. Many common algorithms, that see a lot of reuse across different problem domains, involve complex manipulatio...
متن کاملIntroducing Alias Information into Model-Based Debugging
Model-based diagnosis applied to computer programs has been studied for several years. Although there are still weaknesses in the used models, especially on dealing with dynamic data structures, the approach has been proven useful for automatic debugging. The weaknesses stem from the fact that heap objects are modeled without considering alias information. Our approach extends the modeling proc...
متن کاملHeapviz: Interactive Heap Visualization for Program Understanding and Debugging
Understanding the data structures in a program is crucial to understanding how the program works, or why it doesn’t work. Inspecting the code that implements the data structures, however, is an arduous task and often fails to yield insights into the global organization of a program’s data. Inspecting the actual contents of the heap solves these problems but presents a significant challenge of i...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006